HP Envelope Printer By Michael J. Himowitz CIS 71655,1327 Federal Hill Software 8134 Scotts Level Road Baltimore, MD 21208 This is a little Visual Basic utility that will print an envelope on a Hewlett Packard LaserJet II or compatible without requiring that you change your printer setup in Windows. I've only been fooling around with VB for a couple of weeks now and don't claim to be any kind of expert (anyone who looks at the code will see that). But this one seems to work. Most of the time, people have their printer set for portrait mode. Unfortunately, if you want to use a word processor to print an envelope, you have to go into Printer Setup and change to landscape mode to print the envelope, then reset the whole shebang for portrait mode. It's a pain. This program bypasses Print Manager and sends strings directly to the printer. It puts the LaserJet into landscape mode, prints the envelope and then resets it to portrait mode. It doesn't seem to interfere with Windows programs that use Print Manager, since they apparently initialize the printer each time they use it. I had no problem printing a document with AmiPro, printing the envelope with HPENV, and then printing the document again from AmiPro. The main drawback is that the program will only use the printer's default Courier typeface. But that's fine for most business correspondence, and if you want an envelope quickly, this will do it. You can enter up to six lines of address information, and a four line return address. The sixth line of the address will print in the lower left hand corner of the envelope. You don't have to use all six lines. Just leave the ones you don't want to use blank. To print the envelope, click on the PRINT command button. To clear the current address information, click on the CLEAR command button. By clicking on Return Address on the top menu line or on the Return Address block, you'll bring up a return address form. Just fill in the blanks. You can also click on a button that tells the program whether to print the return address or not. So even if you've entered a return address, you don't have to use it. The printing is accomplished by opening a file called "\DEV\LPT1" which goes directly to the printer without using print manager. I haven't found it documented in the manual, but it's in some other programs I've downloaded and seems to work fine. To give credit where it's due, I got the idea for the program and the HP printer codes that accomplish the job from a dBase program published in PC Computing Magazine. There's a mistake or two in the magazine's codes, so don't use those. The trick is to set the x and y position of the printer's cursor for each line of the envelope. If you have cartridge fonts or soft fonts downloaded and want to access them, you can add the HP codes to use them, although you may have to adjust the x and y positions of the printer cursor to get the proper spacing. Feel free to play with the program and make improvements or changes. A couple of possible ideas are tying the print routines into a name and address file, or setting up a default file that stores a return address and reading it in at run time. You can also use the print routines for things like tractor feed mailing labels on dot matrix printers, which get all fouled up with VB's printer.print and EndDoc. Mike Himowitz ----------------end-of-author's-documentation--------------- Software Library Information: This disk copy provided as a service of Public (software) Library We are not the authors of this program, nor are we associated with the author in any way other than as a distributor of the program in accordance with the author's terms of distribution. Please direct shareware payments and specific questions about this program to the author of the program, whose name appears elsewhere in this documentation. If you have trouble getting in touch with the author, we will do whatever we can to help you with your questions. All programs have been tested and do run. To report problems, please use the form that is in the file PROBLEM.DOC on many of our disks or in other written for- mat with screen printouts, if possible. PsL cannot debug pro- programs over the telephone, though we can answer questions. Disks in the PsL are updated monthly, so if you did not get this disk directly from the PsL, you should be aware that the files in this set may no longer be the current versions. Also, if you got this disk from another vendor and are having prob- lems, be aware that some files may have become corrupted or lost by that vendor. Get a current, working disk from PsL. For a copy of the latest monthly software library newsletter and a list of the 3,000+ disks in the library, call or write Public (software) Library P.O.Box 35705 - F Houston, TX 77235-5705 Orders only: 1-800-2424-PSL MC/Visa/AmEx/Discover Outside of U.S. or in Texas or for general information, Call 1-713-524-6394 PsL also has an outstanding catalog for the Macintosh.